(define-syntax define-ast-handler
  (syntax-rules ()
    ((define-ast-handler (name arg ...) local-definition ... )
     (begin 
       (define env (scheme-report-environment 5))
       (eval `(define format ,format) env) ;; TODO: need to generalize
       (eval `local-definition env) ...
       (define (name arg ... ast)
         ((eval 
          `(lambda (,'arg ...) ;; <== wrapping with lambda allows access to arguments
             ,ast)
          env) arg ...))))))